<script setup>
//导入ref
import { ref,onMounted } from 'vue'
const count = ref (0)
//定义一个函数，完成add
function add(){
    count.value++
}
//声明钩子函数
onMounted(()=>{
    console.log('组件挂在完毕')
})
</script>

<template>
<button @click="count++">count is:{{count}}</button>
</template>

<style scoped>

</style>